﻿// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : MultiServerEngine | TypeDefs | ErrorCodes.cs
// //  Created : 2016 - 02 - 16 20:53
// //  Modified: 2016 - 02 - 20 12:33
// //  ********************************************************************************

using System.ComponentModel;

namespace TypeDefs
{
    public enum ErrorCodes
    {
        Ok = 0, // No error is present

        // --- General error codes for inter server and client server communication
        InvalidOperation = 10000, // We have received an operation that we cannot handle
        InvalidTelegram = 10001, // We have received a telegram that is not valid at all
        NoServerFound = 10002, // We didn't find a server capable of handling the telegram
        NoClientFound = 10003, // We didn't find a client (peer) capable of handling the telegram
        NoHandlerFound = 10004, // We didn't find a handler capable of handling the telegram

        // --- Error codes for the authorization system
        [Description("Credentials provided are not valid")] InvalidCredentials = 11000,
        // We have received a login request with invalid credentials
        [Description("Account not found and/or not registered")] NoAccountFound = 11001,
        // We have received a request for an account that doesn't exist
        [Description("Account with that email is already registered")] AccountAlreadyRegisterd = 11002
        // We have found an account with the same account name already registered
    }
}
